<?php
require_once('auth.php');
?>
<!DOCTYPE html>
<html>
    <link type="text/css" rel="stylesheet" href="giftgiving.css"/>
    <!-- Uncomment the line below to include javascript in your webpage -->
    <!--<script type="text/javascript" src="giftgiving.js"/>-->
    <style type="text/css">
<!--
.STYLE1 {
	font-size: 18px;
	font-weight: bold;
}
.STYLE2 {font-size: 16px}
-->
    </style>
    <head>
        <title>Floral Home</title>
    </head>
    <body>
        <div id="gift-view-id">
            <div id="gift-navpane-id" class="gift-navpane">
    			<div id="gift-pets-id" class="gift-types gift-types">
                    <a href="cus_home.php" class="STYLE1">Home</a>				    </div>
    			<div id="gift-pets-id" class="gift-types">
                    <a href="cus_profile.php" class="STYLE1">My Profile</a>			</div>
				<div id="gift-pets-id" class="gift-types-selected">
                    <a href="cus_myOrder.php" class="STYLE1">My Order</a>			</div>
				<div id="gift-register-id" class="gift-types">
                    <a href="cus_reg.php" class="STYLE1">Register</a>    			</div>
                <?php   
							
					        if (!isset($_SESSION['SESS_CID']) || (trim($_SESSION['SESS_CID']) == '')){
								echo '<div id="gift-register-id" class="gift-types">
										<a href="cus-login.php" class="STYLE1">Login</a>    </div>';
							}else{
								echo '<div id="gift-register-id" class="gift-types">
										<a href="cus-login.php" class="STYLE1">Logout</a>     </div>';
							}
				?>
    		</div>
    		<div id="gift-choosepane-id" class="gift-choosepane">
               <!-- Note the onClick handler for this element -->
              <div id="gift-table" onClick="onGiftClick()">
        	   <table>
        			<th colspan="8"><span class="STYLE2">Input order information</span></th>
        			<form action="order.php" method="post">
                       <!-- The different gift elements have unique ids -->
        			<?php
					echo "
					<tr>
						<td> <img id='Socks' src='".$_POST['fpicture']."'/></td>
					</tr>";
					?>
        			<tr>
        				<td>Receiver Name: <input type="text" name="reName" required/></td>
        			</tr>
        			<tr>
        				<td>Receiver Address: <input type="text" name="reAddress" required/></td>
        			</tr>
                    <tr>
            			<td>Receiver Phone Number: <input type="text" name="rePhoneNo" required />
        			</tr>
					<tr><?php $today = date('Y-m-d');
					     echo "
            			<td>Deliver Date: <input type='date' name='deliverDate' min = '".$today."' required/></td>";
						?>
					</tr>
					<tr>
						<td>Number: <input type="number" name="num" min="1" max="<?php echo $_POST['fquantity'];?>"></td>
        			</tr>
            			<input type="hidden" name="method" value="insertOrder"/>
						<input type="hidden" name="cid" value= <?php echo $_SESSION['SESS_CID'];?> />
						<!-- <input type="hidden" name="fname" value= "blue romance"/> -->
						<?php echo '<input type="hidden" name="fname" value= "'.$_POST['fname'].'"; />';?>
						<input type="hidden" name="fsize" value= <?php echo $_POST['fsize'];?> />
        			<tr>
						<td><input name="" type="submit" value="Order" /></td>
					</tr>
					
                  </form>
        		</table>

              </div>
    		</div>
        </div>
	</body>
<ml>